<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>自定义注册</title>
</head>
<body>
    <h1> 自定义用户注册页面 </h1>
    <img id="headImg">hi, <span id="nickName"></span> ,欢迎登陆DRIES
    <form action="/user/register" method="post">
        <table>
            <tr>
                <td>用户名：</td>
                <td><input name="userName"/></td>
            </tr>
            <tr>
                <td>密码：</td>
                <td><input name="password"/></td>
            </tr>
            <tr>
                <td>图形验证码:</td>
                <td>
                    <input type="text" name="imageCode">
                    <img src="/code/image">
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <button type="submit" name="type" value="register">注册</button>
                    <button type="submit" name="type" value="binding">绑定</button>
                </td>
            </tr>
        </table>

    </form>

</body>

<script type="text/javascript" src="js/jquery.js"></script>

<script type="text/javascript">
    function getSocialUserInfo() {
        $.get({
            url: "/social/user",
            type: "get",
            success: function (res) {
                $("#headImg").attr("src", res.avatar);
                $("#nickName").text(res.nickname);
            }
        })
    }

    window.onload = getSocialUserInfo;
</script>
</html>